import request from '@/utils/request'
export function login(data) {
  return request({
    url: '/api/signIn',
    method: 'post',
    params:data
  })
}

export function getInfo(token) {
  return request({
    url: '/api/user/tokenInfo',
    method: 'get',
    params: { token: token }
  })
}

export function logout() {
  return request({
    url: '/logout',
    method: 'post'
  })
}

// 列表
export function getListData(query) {
  return request({
    url: '/api/user/list',
    method: 'get',
    params: query
  })
}

export function seeScene(id) {
  return request({
    url: '/api/user/see',
    method: 'get',
    params: { id: id }
  })
}
export function addUser(data) {
  return request({
    url: '/api/user/add',
    method: 'post',
    params: data
  })
}

export function modify(data) {
  return request({
    url: '/api/user/modify',
    method: 'post',
    params: data
  })
}

// 删除
export function deleteInfo(id) {
  return request({
    url: '/api/user/delete',
    method: 'post',
    params: { id: id }
  })
}
